package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.beans.factory.annotation.Value;

@TableName("t_room")
public class RoomBean {
    @TableId(value = "pk_roomId",type = IdType.AUTO)
    private int id;
    @TableField("r_address")
    private String address;
    @TableField(exist = false)
    private ManBean man;
    @TableField("fk_manId")
    private int manId;

    public RoomBean() {
    }

    public RoomBean(String address, int manId) {
        this.address = address;
        this.manId = manId;
    }

    public RoomBean(String address) {
        this.address = address;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public ManBean getMan() {
        return man;
    }

    public void setMan(ManBean man) {
        this.man = man;
    }

    public int getManId() {
        return manId;
    }

    public void setManId(int manId) {
        this.manId = manId;
    }

    @Override
    public String toString() {
        return "RoomBean{" +
                "id=" + id +
                ", address='" + address + '\'' +
                ", man=" + man +
                ", manId=" + manId +
                "}\n";
    }
}
